<template>
    <div>
       <div class="list" 
            v-for="(item,index) of list" 
            :key="index"
        >
            <div class="item-title border-bottom">
                <span class="item-icon"></span>
                {{item.title}}
            </div>
            <div v-if="item.children" class="item-children">
                <dlist :list='item.children'></dlist>
            </div>
       </div>
    </div>
</template>

<script>
export default {
    name:'dlist',
    props:{
        list:Array
    }
}
</script>
<style lang="stylus" scoped>
  @import '~styles/varibles.styl'
    .item-title
        height :.8rem
        line-height :.8rem
        position: relative
        padding-left:.7rem
        font-size :.30rem
        .item-icon
            background: url(http://s.qunarzz.com/piao/image/touch/sight/detail.png) 0 -.45rem no-repeat
            margin-right: .1rem
            position: absolute
            width: .36rem
            height: .36rem
            top: .23rem
            left: .2rem
            background-size: .4rem 3rem
    .item-children
        padding-left:.2rem
</style>